// ts在去定义变量必须指定变量的一个类型，
// 语法 let 变量名:变量类型 = 变量值
// 定义一个数字类型
let num = 10;
//num = "1111"    错误的
num = 20;
console.log(num);
// 定义一个字符串类型
let str = "hello";
// 如果是定义一个数组，指定数组里面元素内容的类型
// js允许数组存储不同类型的数据
// 定义一个数字数组 number[]数字数组类型
let arr1 = [1, 2, 3];
arr1.push(4);
let arr2 = ["1", "2", "3"];
// 也可以通过下面这种方式进行定义数组
let arr3 = [1, 2, 3];
// enum:枚举类型把数据的多种情况使用其他数据进行表示
var Season;
(function (Season) {
    Season[Season["Spring"] = 1] = "Spring";
    Season[Season["Summer"] = 2] = "Summer";
    Season[Season["Autumn"] = 3] = "Autumn";
    Season[Season["Winter"] = 4] = "Winter";
})(Season || (Season = {}));
var Color;
(function (Color) {
    Color[Color["Red"] = 0] = "Red";
    Color[Color["Green"] = 1] = "Green";
    Color[Color["Blue"] = 2] = "Blue";
})(Color || (Color = {}));
;
let c = Color.Blue;
console.log(c);
console.log(Season.Spring);
